#ifndef _LNLIST_H_
#define _LNLIST_H_
#include "declare.h"
#include <stdio.h>
#include <stdlib.h>
#define ELEMTYPE int
struct LNode;

struct LNode {
    ELEMTYPE info;
    struct LNode * link;
};

typedef struct LNode * PNode;
typedef struct LNode * POSITION;

struct lnList {
    PNode head;
    PNode rear;
    int length;
};

typedef struct lnList * LnList;

LnList createLnList(void);
int insertPostLnList(LnList list, POSITION p, ELEMTYPE x);
int insertPreLnList(LnList list, POSITION p, ELEMTYPE x);
int insertLnList(LnList list, ELEMTYPE x);
POSITION locateVertexLnList(LnList list, ELEMTYPE x);
void printLnList(LnList list);
void destroyLnList(LnList *list);
int appendElemLnList(LnList list, ELEMTYPE x);
int lengthLnList(LnList list);
#endif
